1. Field of the Invention
The invention relates generally to facsimiles, and, more particularly, to controlling buffer overflow and underflow for facsimile transmission over mobile communication channels by using fill bits, selective line-dropping, drastic line-dropping, and smooth buffer-flushing.
2. Description of the Related Art
It is known that facsimile transmission time can be reduced by using compression techniques before transmission of facsimile documents scanned into a sending facsimile machine. The compressed facsimile documents are stored in a buffer before being transmitted via a communication network to a receiving facsimile machine. Image compression techniques are particularly important in facsimile transmission in mobile communications because of the relatively high cost for air time. Further, in mobile communication networks it is known to use a circular buffer to store the digitized and compressed facsimile document before transmission. However, the circular buffer can experience buffer overflow or underflow problems which degrade the accuracy of the facsimile document as reproduced by the receiving facsimile machine.
To transmit standard Group 3 facsimile (fax) documents over mobile communications networks in a cost-efficient manner, it is necessary to employ secondary image compression techniques to reduce the amount of information necessary to describe the image. When secondary image compression is employed for a standard G3 fax machine, it is essential to implement a method of buffer control to control the flow of data bits between the compression algorithm and the mobile channel. Controlling the flow of data is required since image compression gains can vary significantly from image scan line to scan line which will not necessarily be coincident to the transmission channel transmission rate. For instance, if there is a high degree of correlation between a current scan line and its previous scan line, then the compression gain for the current scan line will be much higher than if there were a low degree of similarity between adjacent scan lines. As a result, statistical variations in these compression gains lead to fluctuations in the rate at which encoded bits of information become available for transmission. Since the transmission channel requires a steady flow of bits at a constant rate, a buffering mechanism is required to interface the compression algorithm and the communications channel. However, the buffer can suffer from buffer underflow and buffer overflow which creates illegible and/or incomplete documents to be transmitted to the receiving fax machine.
Buffer underflow results when, over a period of time, the compression process generates data bits at a slower rate than can be transmitted over the channel. Buffer underflow must be suitably controlled to maintain proper operation and transmission of the fax document or the fax document will not be legible as printed by the receiving tax machine. Buffer overflow results when, over a period of time, the compression algorithm generates bits at a higher rate than can be transmitted over the channel. If not controlled, buffer overflow can lead to a loss of data and a disruption in the transmission of the image, each contributing to an illegible and/or incomplete document as printed by the receiving fax machine. Buffer overflow is controlled by generating, just before the buffer capacity is exceeded, a control signal which causes the facsimile system to delete the preceding scan line.
Further, traditional facsimile compression techniques suffer from a problem of clipping the bottom of highly detailed documents because there is a maximum period of 1.6 seconds available for emptying the buffer at the end of each transmitted document page. Any untransmitted data that remains in the buffer after the 1.6 seconds available for emptying the buffer is deleted from the buffer and not transmitted, allowing the buffer to begin loading data for the next transmission page. The more highly detailed the transmission document, the more data that will be deleted from the end of the transmission document page, and the more clipping of the printed document that occurs at the receiving facsimile machine. This problem occurs in traditional facsimile compression techniques when sending highly detailed documents regardless of the facsimile machine""s ability to control the buffer to prevent underflow or overflow during transmission.
In view of the above, one object of the present invention is to provide an improved facsimile system.
Another object of the invention is to provide a facsimile system which enables the use of secondary compression techniques for efficient transmission of facsimile documents over mobile networks without significant buffer underflow or buffer overflow.
Another object of the present invention is to provide a facsimile system which can transmit complex documents without losing data as a result of the bottom of a page being clipped.
Another object of the present invention is to provide a facsimile system which can transmit complex documents with a minimal amount of information loss confined to only extremely detailed documents, while still maintaining high overall image intelligibility.
Another object of the present invention is to provide a process for facsimile transmission which improves facsimile document transmission accuracy by controlling a buffer mechanism to prevent data underflow and/or overflow.
According to one aspect of the present invention, buffer underflow is prevented by forcing the buffer""s transmit pointer to wait at the previous end-of-line (EOL) symbol, e.g., a bit sequence consisting of 11 0""s followed by a 1 (i.e., 000000000001), until at least one subsequent EOL symbol is present in the buffer. While the transmit pointer waits at the most recent EOL symbol, the channel is then stuffed with fill bits, bits with value 0. This technique is simple to implement, causes no loss in the performance of the compression algorithm, and cures the problem of underflow which causes loss of synchronization and distortion of the facsimile document.
According to another aspect of the present invention, buffer overflow and page cutoff is prevented using the buffer control mechanisms of selective line-dropping, drastic line-dropping, and smooth buffer-flushing processes to control the flow of data information in the transmission of facsimile documents across mobile networks. The present invention uses selective line-dropping to solve the buffer overflow problem and drastic line-dropping and smooth buffer-flushing processes to solve the page cutoff problem.
For selective line-dropping, a 20,000 bit circular buffer is provided with various zones to indicate distinct regions of bit locations within which the buffer""s write pointer can be relative to the buffer""s transmit pointer in the circular buffer. The transmit pointer reads bits but of the circular buffer to be sent across the channel; the write pointer writes bits into the circular buffer after the compression algorithm. In a preferred embodiment, there are five distinct zones designated in the circular buffer which include the safety zone, low critical zone, middle critical zone, high critical zone, and cutoff zone, each zone respectively corresponding to the write pointer getting closer to the transmit pointer and thereby increasing the probability of buffer overflow (i.e., write pointer overcoming the transmit pointer). If the write pointer is located anywhere within the safety zone, no overflow control is necessary. If the write pointer falls within any one of the three critical zones (low, middle or high), buffer overflow algorithms are initiated. First, the current scan line and previous scan line are compared with one another to determine their bit difference value, and this value is compared with a threshold associated with the particular critical zone, with the critical zones having higher thresholds as the transmit pointer is approached more closely by the write pointer. If the difference value between the two scan lines does not exceed the threshold, for that critical zone, then the current scan line and previous scan lines are considered similar enough for line-dropping to take place. Otherwise, no line-dropping occurs and the present scan line is simply encoded.
If a scan line is determined to be dropped, a special line-dropping bit is set to 1 and sent to the decoder. At the receiving facsimile system, the line-dropping mode is detected by monitoring the code bit and the previously decoded scan line is duplicated at the current scan line""s position in the output document.
When a highly detailed document is scanned, compression gains are extremely low, the probability of buffer overflow is extremely high, and the write pointer may actually fall within the cutoff zone. Should this situation arise, an end of page (EOP) sequence, consisting of 6 EOL sequences, is immediately transmitted to the receiving facsimile machine. This signals the end of document transmission and the termination of any further decoding. The remainder of the document, from the point of cutoff, is then replaced with blank lines, ensuring that the resulting document at the receiving facsimile machine is not filled with garbage, but rather, implicating to the person receiving the fax, that an error has occurred during the transmission process.
To eliminate the page cutoff problem, smooth buffer-flushing is initiated at the start of document processing, where after a certain percentage of the incoming image has been scanned, the maximum number of bits allowed to exist in the buffer is reduced. This is performed in a stair-step manner such that the maximum number of bits allowed in the buffer is reduced as the percentage of the present page scanned increases.
Within each percentage region of a page, selective line-dropping is customized for that specific maximum buffer capacity. Hence, as the permitted maximum buffer capacity gradually decreases over the course of a document, the sizes of the safety zone and three critical zones increase, thereby increasing the probability of selective line-dropping and reducing the probability of buffer overflow. Within each of the percentage regions, drastic line-dropping is initiated if the number of bits between the write pointer and transmit pointer exceeds the maximum number of bits allowed to exist in the buffer for that region. Drastic line-dropping is the same as selective line-dropping except that all scan line bits written into the circular buffer are consecutively dropped until the distance between the write and transmit pointers is less than the maximum buffer threshold.